/*
 * File:   mover3d.h
 * Author: oddi
 *
 * Created on October 3, 2010, 1:31 PM
 */

#ifndef _MOVER3D_H
#define	_MOVER3D_H

#include "inc/core/global_definitions.h"
#include "inc/core/ucgrid3d.h"
#include "inc/core/ebsources.h"

#define MAX_BUF_SIZE 256



#ifdef	__cplusplus
extern "C" {
#endif

    typedef struct struct_mover3d_parameters {
        ucgrid3d* grid;
        particles_set* set;
        sources_pack* sources;
        floatdig dt;
    } mover3d_parameters;

    typedef struct struct_mover3d_initialized {
        sources_pack* sources;
        floatdig* E_ext;
        floatdig* B_ext;
        int cycles;
        floatdig qm;
        floatdig qmc;
        floatdig dt;
        floatdig dx;
    } mover3d;

    typedef mover3d* pmover;

    int mover3d_setup_mover(mover3d_parameters*, mover3d*);
    void mover3d_single_iteration(mover3d* mover, ucgrid3d* grid, particles_set* set);
    void mover3d_clear_mover(mover3d* mover);

    #ifdef DEBUG
    void mover3d_make_snapshot_of_ext_E(ucgrid3d*, mover3d*, char*);
    #endif

#ifdef	__cplusplus
}
#endif

#endif	/* _MOVER3D_H */
